//
//  TTNotificationCenter.swift
//  TianTianBiTing
//
//  Created by Gox mac 2 on 2018/12/28.
//  Copyright © 2018 Gox_WallyDiao. All rights reserved.
//

import Foundation
import ReactiveSwift

class TTNotificationCenter {
    class func addNotificatioin(_ name :String,observeValues:@escaping (_ value:Any)->()) {
        NotificationCenter.default.reactive.notifications(forName:Notification.Name(rawValue: name), object: nil).observeValues { (value) in
            observeValues(value)
        }
    }
    class func Post(_ name:String,obj:Any?) {
        NotificationCenter.default.post(name: Notification.Name(rawValue: name), object: obj)
    }
}
